package com.xinya.wanandroidclient.ui.me

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.xinya.wanandroidclient.base.BaseViewModel
import com.xinya.wanandroidclient.bean.UserInfoBean

/**
 *
 * @ClassName:      MeViewModel$
 * @Description:    java类作用描述
 * @Author:         xinya
 * @CreateDate:     2021/3/10$ 10:36$
 * @UpdateRemark:   更新内容
 * @Version:        1.0
 */
class MeViewModel : BaseViewModel() {
    fun getUserInfo() {
        repo.getUserInfo(userInfoLiveData, errorLiveData)
    }

    fun logout() {
        repo.logout()
    }

    private val repo by lazy {
        MeRepo(viewModelScope)
    }


    val userInfoLiveData by lazy {
        MutableLiveData<UserInfoBean>()
    }



}